# coding: utf-8
from sqlalchemy import Column, Integer, String, Text, text
from sqlalchemy.dialects.mysql import TINYINT
from sqlalchemy.ext.declarative import declarative_base

Base = declarative_base()
metadata = Base.metadata


class VideoInfo(Base):
    __tablename__ = 'video_info'

    vid = Column(String(50), primary_key=True)
    uname = Column(String(50))
    vurl = Column(Text)
    down = Column(TINYINT(1), server_default=text("'0'"))
    created_at = Column(Integer)
    duration = Column(Integer, server_default=text("'0'"))
    vname = Column(Text)
    play_addr = Column(Text)
